package javabase.schoolwork.day6_6;

/**
 * @author fance
 * @date 18-6-6 下午1:33
 */
public class PointII<T> {
    private T x;
    private T y;

    public PointII(T x, T y) {
        this.x = x;
        this.y = y;
    }

    public T getX() {
        return x;
    }

    public void setX(T x) {
        this.x = x;
    }

    public T getY() {
        return y;
    }

    public void setY(T y) {
        this.y = y;
    }

    public static void main(String[] args) {
        PointII<Integer> pointII = new PointII<Integer>(10,20);
        System.out.println(pointII.getX());
        System.out.println(pointII.getY());


        PointII point = new PointII(10,"haha");
        System.out.println(point.getX());
        System.out.println(point.getY());
    }
}
